const Controller=require("egg").Controller
const PageModel=require("../model/PageModel");
const MessageBox=require("../utils/MessageBox");
const appConfig=require("../../config/appConfig");
const path=require("path");
const fs=require("fs");

class HomeController extends Controller{
    async index(){
        //拿到全部的商品分类，放到左边
        let categoryInfoList = await this.ctx.service.categoryInfo.getAllList();
        
        await this.ctx.render("home/index",{
            categoryInfoList:categoryInfoList.slice(0,11)
        });
    }
}

module.exports=HomeController;